package com.example.xln111.controller;

import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class LoginController {

    @PostMapping("/user/login")
    @ResponseBody
    public Object login(
            String username, String password, HttpServletResponse res,HttpServletRequest resp) {
        if (username.equals("xln") && password.equals("123456")) {
            System.out.println("正确");
            return 0;
        } else {
            System.out.println("不正确");
            return 1;
        }

    }

}